import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("cooperate_apply", { schema: "alumni" })
export class CooperateApply {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("int", { name: "user_id", unsigned: true, default: () => "'0'" })
  userId: number;

  @Column("int", {
    name: "target_user_id",
    unsigned: true,
    default: () => "'0'",
  })
  targetUserId: number;

  @Column("int", { name: "target_id", unsigned: true, default: () => "'0'" })
  targetId: number;

  @Column("int", { name: "school_id", unsigned: true, default: () => "'0'" })
  schoolId: number;

  @Column("tinyint", {
    name: "school_level",
    unsigned: true,
    default: () => "'0'",
  })
  schoolLevel: number;

  @Column("varchar", { name: "user_phone", length: 20 })
  userPhone: string;

  @Column("varchar", { name: "target_phone", length: 20 })
  targetPhone: string;

  @Column("varchar", { name: "content", length: 200 })
  content: string;

  @Column("varchar", { name: "reply_content", length: 200 })
  replyContent: string;

  @Column("varchar", { name: "phone", length: 20 })
  phone: string;

  @Column("tinyint", { name: "status", unsigned: true, default: () => "'0'" })
  status: number;

  @Column("int", {
    name: "create_time",
    comment: "发起时间",
    unsigned: true,
    default: () => "'0'",
  })
  createTime: number;

  @Column("int", {
    name: "reply_time",
    comment: "回复时间",
    unsigned: true,
    default: () => "'0'",
  })
  replyTime: number;
}
